package com.clz.hyperit.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

import com.clz.hyperit.util.IdAnnotationin;
import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Entity
@Table(name = "articletag", catalog = "hyperit")
public class ArticleTag {

	@IdAnnotationin
	private Integer id;
	private Integer article_id;
	private Integer tag_id;
	private String createtime;
	public ArticleTag() {
	}
	
	public ArticleTag(Integer id,String createtime) {
		this.id = id;
		this.createtime = createtime;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "article_id")
	public Integer getArticle_id() {
		return article_id;
	}
	public void setArticle_id(Integer article_id) {
		this.article_id = article_id;
	}
	@Column(name = "tag_id")
	public Integer getTag_id() {
		return tag_id;
	}
	public void setTag_id(Integer tag_id) {
		this.tag_id = tag_id;
	}
	@Generated(GenerationTime.INSERT)
	@Column(name = "createtime")
	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	@Override
	public String toString() {
		return "ArticleTag [id=" + id + ", article_id=" + article_id
				+ ", tag_id=" + tag_id + ", createtime=" + createtime + "]";
	}



	
	
}
